package com.wujie.section091;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * Created by wujieliu on 2017/10/25.
 */
public class PancakeHouseMenu implements Menu {
    ArrayList menuItems;

    public PancakeHouseMenu() {

        menuItems = new ArrayList();

        addItem("kb",
                "Pancakes with",
                true,
                2.99);
        addItem("Regular",
                "Pancakes with fried eggs",
                false,
                2.99);
        addItem("Blueberry",
                "Pancakes with fish  bluebrries",
                true,
                3.49);
        addItem("Waffles",
                "Waffles with fish  bluebrries",
                true,
                3.59);


    }

    public void addItem(String name, String description, boolean vegetarian, double price) {
        MenuItem menuItem = new MenuItem(name, description, vegetarian, price);
        menuItems.add(menuItem);
    }

    //    public ArrayList getMenuItems() {
//        return menuItems;
//    }
//    public Iterator createIterator() {
//        return new PancakeHouseIterator(menuItems);
//    }

    public Iterator createIterator() {
        return menuItems.iterator();
    }
}
